package com.tt.vtg.dao;

import java.util.Set;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.tt.vtg.dao.entity.User;

@Repository
public interface UserDao extends JpaRepository<User, Long>{
	User findByUserId(String userId); 
	
	User findByUserName(String userName);
	
	
//	@Query("select u.roles from User u where u.userName=?1 ")
	Set<String> findRolesByUserName(String userName);
	
	Set<String> findPermissionsByUserName(String userName);
	
}
